package ulric.server;

public class ServerFactory {

    private static final int DEFAULT_PORT = 80;
    private static final String DEFAULT_CONTEXT_PATH = "/";

    private ServerFactory() {

    }

    public static IServer getServer(String webAppDir, int port, String contextPath) {
        return new JettyServer(webAppDir, port, contextPath);
    }

    public static IServer getServer(String webAppDir, String contextPath) {
        return new JettyServer(webAppDir, DEFAULT_PORT, contextPath);
    }

    public static IServer getServer(String webAppDir, int port) {
        return new JettyServer(webAppDir, port, DEFAULT_CONTEXT_PATH);
    }

    public static IServer getServer(String webAppDir) {
        return new JettyServer(webAppDir, DEFAULT_PORT, DEFAULT_CONTEXT_PATH);
    }

}




